package com.csi.okr.mobile.common.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * 可见人表 实体类
 */
@Embeddable
public class TOkrDesignatedVisibleId implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private String OUniqueIdCode;
	private String designatedePersonCode;

	public TOkrDesignatedVisibleId() {
	}

	public TOkrDesignatedVisibleId(String OUniqueIdCode, String designatedePersonCode) {
		this.OUniqueIdCode = OUniqueIdCode;
		this.designatedePersonCode = designatedePersonCode;
	}

	@Column(name = "O_UNIQUE_ID_CODE", nullable = false, length = 20)
	public String getOUniqueIdCode() {
		return this.OUniqueIdCode;
	}

	public void setOUniqueIdCode(String OUniqueIdCode) {
		this.OUniqueIdCode = OUniqueIdCode;
	}

	@Column(name = "DESIGNATEDE_PERSON_CODE", nullable = false, length = 12)
	public String getDesignatedePersonCode() {
		return this.designatedePersonCode;
	}

	public void setDesignatedePersonCode(String designatedePersonCode) {
		this.designatedePersonCode = designatedePersonCode;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TOkrDesignatedVisibleId))
			return false;
		TOkrDesignatedVisibleId castOther = (TOkrDesignatedVisibleId) other;

		return ((this.getOUniqueIdCode() == castOther.getOUniqueIdCode())
				|| (this.getOUniqueIdCode() != null && castOther.getOUniqueIdCode() != null
						&& this.getOUniqueIdCode().equals(castOther.getOUniqueIdCode())))
				&& ((this.getDesignatedePersonCode() == castOther.getDesignatedePersonCode())
						|| (this.getDesignatedePersonCode() != null && castOther.getDesignatedePersonCode() != null
								&& this.getDesignatedePersonCode().equals(castOther.getDesignatedePersonCode())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getOUniqueIdCode() == null ? 0 : this.getOUniqueIdCode().hashCode());
		result = 37 * result + (getDesignatedePersonCode() == null ? 0 : this.getDesignatedePersonCode().hashCode());
		return result;
	}

}
